/* 二维码生成页面样式 */
.generate-qrcode-container {
  padding: 24px;
  min-height: calc(100vh - 120px);
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  margin-bottom: 8px;
  color: #262626;
}

.page-description {
  color: #8c8c8c;
  margin-bottom: 0;
  line-height: 1.6;
}

.content-row {
  margin-bottom: 24px;
}

.form-card {
  height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.result-card {
  height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.device-form .ant-form-item {
  margin-bottom: 16px;
}

.device-form .ant-form-item-label > label {
  font-weight: 500;
  color: #262626;
}

.device-form .ant-input,
.device-form .ant-select,
.device-form .ant-picker {
  border-radius: 6px;
}

.qrcode-result {
  text-align: center;
  padding: 24px;
}

.qrcode-container {
  margin: 0 auto 24px;
  padding: 16px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  display: inline-block;
}

.qrcode-react-container {
  width: 256px;
  height: 256px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  background-color: white;
  display: block;
  margin: 0 auto;
  overflow: hidden;
}

/* 兼容旧的CSS类名，确保向后兼容 */
.qrcode-image {
  width: 256px;
  height: 256px;
  object-fit: contain;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  background-color: white;
  display: block;
  margin: 0 auto;
}

/* 确保canvas也有合适的尺寸 */
.qrcode-container canvas {
  max-width: 100%;
  height: auto;
}

.qrcode-info {
  margin-bottom: 24px;
  text-align: left;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  padding: 16px;
  background: #f5f5f5;
  border-radius: 6px;
}

.info-item {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-label {
  font-weight: 500;
  color: #262626;
  min-width: 80px;
}

.info-value {
  color: #595959;
  flex: 1;
  word-break: break-all;
}

.qrcode-actions {
  display: flex;
  justify-content: center;
}

.empty-result {
  text-align: center;
  padding: 48px 24px;
  color: #8c8c8c;
}

.empty-icon {
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-text {
  font-size: 14px;
}

.guide-card {
  background-color: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
}

.guide-content {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.guide-item {
  display: flex;
  align-items: flex-start;
  width: calc(50% - 8px);
  margin-bottom: 8px;
}

.guide-item:last-child {
  margin-bottom: 0;
}

.guide-icon {
  background: #1890ff;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  margin-right: 8px;
  flex-shrink: 0;
  margin-top: 2px;
}

.guide-text {
  flex: 1;
  font-size: 14px;
  color: #595959;
  line-height: 1.6;
}

.error-message {
  padding: 12px 16px;
  background-color: #fff1f0;
  border: 1px solid #ffccc7;
  border-radius: 6px;
  color: #cf1322;
  font-size: 14px;
  margin-top: 16px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .guide-item {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .generate-qrcode-container {
    padding: 16px;
  }
  
  .page-title {
    font-size: 18px;
  }
  
  .qrcode-container {
    margin: 0 auto 16px;
    padding: 12px;
  }
  
  .qrcode-info {
    margin-bottom: 16px;
    padding: 12px;
  }
  
  .guide-content {
    flex-direction: column;
    gap: 12px;
  }
  
  .guide-item {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .qrcode-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .qrcode-actions button {
    width: 100%;
  }
}